<html>
<head>
<style>
@page {
  size: 150px 200px;
  margin: 0;
}
body {
  max-width: 150px;
  padding: 0;
  margin: 0;
}
div {
  margin-bottom: 5px;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
}
</style>
</head>
<body>
<div style="border: 2px solid pink;"></div>
<div style="background-color: blue;"></div>
<div style="background-color: red; border: 2px solid black;"></div>
<div style="background-color: purple; border: 2px solid orange; height: 100px;"></div>
<div style="width: 50%;background-color: gray;"></div>
<div style="width: 50%; margin-left: 25%;border: 2px solid red;"></div>
</body>
</html>
